
/**
 * iPhoneX
 */

import React, { Component } from 'react';
import { View, StyleSheet } from 'react-native';

import screen from '../common/screen'

class SafeAreaView extends Component {

  constructor(props) {
    super(props)
  }

  render() {
    return (
      <View>
        { this.props.top ? <View style={[styles.top, {backgroundColor: this.props.topColor}]}></View> : null }
        <View>{this.props.children}</View>
      </View>

    );
  }
}

const styles = StyleSheet.create({
  top: {
    height: screen.screenTopInset
  }
})

SafeAreaView.defaultProps = {
  top: true,
  topColor: '#105eae',
}
export default SafeAreaView;

